package Java实验.实验二;

public class Demo1 {
    public void decompose(int score) {
        /********** Begin *********/
        if (score >= 90 && score <= 100) {
            System.out.println("4.0");
        } else if (score >= 80 && score < 90) {
            System.out.println("3.5");
        } else if (score >= 70 && score < 80) {
            System.out.println("3.0");
        } else if (score >= 60 && score < 70) {
            System.out.println("2.5");
        } else {
            System.out.println("0.0");
        }
        /********** End *********/
    }

    public static void main(String[] args) {
        Demo1 d1 = new Demo1();
        d1.decompose(95);
        d1.decompose(84);
        d1.decompose(73);
        d1.decompose(68);
        d1.decompose(55);
    }
}
